{foreach from=$pages->getNextLinks(10) item=foo}
<span class="pages">{$foo}</span>
{/foreach}
<span class="pages">{$pages->getPage()}</span>
{foreach from=$pages->getPrevLinks(10) item=foo}
<span class="pages">{$foo}</span>
{/foreach}
{literal}
<script language="Javascript">
$(document).ready(function(){

        function showLoader(){

                $('.search-background').fadeIn(200);
        }

        function hideLoader(){

                $('.search-background').fadeOut(200);
        };

      
       $(".pages").click(function(){
                showLoader();
                $("#grid").load("index.php?grid=client&page="+this.id , hideLoader);
                $("#pagelinks").load("index.php?grid=client&pagelinks", hideLoader);
                return false;
        });

});
</script>  {/literal}